#ifndef RELAY_H_
#define RELAY_H_

#include <avr/io.h>
#include <inttypes.h>
#include "GlobalDefinitions.h"

typedef struct {
	uint8_t r0:1;
	uint8_t r1:1;
	uint8_t r2:1;
	uint8_t r3:1;
	uint8_t r4:1;
	uint8_t r5:1;
	uint8_t r6:1;
	uint8_t r7:1;
}S_RELAY;
S_RELAY* ps_relay;

typedef struct {
	uint8_t out0:1;
	uint8_t out1:1;
	uint8_t out2:1;
	uint8_t out3:1;
	uint8_t in3:1;
	uint8_t in2:1;
	uint8_t in1:1;
	uint8_t pc_running:1;
}S_IO;
S_IO* ps_io;

void IO_init(void);
void IO_update(void);

#endif /* RELAY_H_ */
